import axios from 'axios';

const audioapi = axios.create({
    // 配置公共请求部分
    baseURL: 'https://autumnfish.cn/',
})

export const audioSearch = function(data){
    return audioapi({
        url : 'search',
        method : 'GET',
        params: {keywords:data}
    }).then(res=>{
        return res.data.result.songs
    })
}
export const audioUrl = function(id){
    return audioapi({
        url : 'song/url',
        method : 'GET',
        params : {id:id}
    }).then(res=>{
        return res.data.data
    })
}
export const audioDetail = function(ids){
    return audioapi({
        url : 'song/detail',
        method : "GET",
        params : {ids : ids}
    }).then(res=>{
        return res.data
    })
}
